module.exports = (app) => {
  const { router, controller, middleware } = app;
  const subRouter = router.namespace("/menu");
  const auth = middleware.authToken();

  subRouter.get("/getMenuList", auth, controller.menu.getMenuList);
  subRouter.get("/getMenuTree", auth, controller.menu.getMenuTree);
  subRouter.post("/createMenu", auth, controller.menu.createMenu);
  subRouter.post("/updateMenu", auth, controller.menu.updateMenu);
  subRouter.post("/deleteMenu", auth, controller.menu.deleteMenu);
};
